mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 22:05:10 +00:00
debug: a
This commit is contained in:
parent
1a6444e498
commit
13aa131493
2 changed files with 5 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ export async function cron(app: ModifiedApp) {
|
|||
// ),
|
||||
// ]);
|
||||
for (const moment of moments) {
|
||||
console.log(moment.id)
|
||||
const isPresent = await app.nocodb.dbViewRow.findOne(
|
||||
"noco",
|
||||
"p63yjsdax7yacy4",
|
||||
|
|
@ -52,7 +53,8 @@ export async function cron(app: ModifiedApp) {
|
|||
},
|
||||
);
|
||||
if (isPresent) continue;
|
||||
if (!moment.description || !moment.video) continue;
|
||||
if (!moment.description && !moment.video) continue;
|
||||
console.log(1)
|
||||
// insert into db
|
||||
await app.nocodb.dbViewRow.create(
|
||||
`noco`,
|
||||
|
|
@ -61,7 +63,7 @@ export async function cron(app: ModifiedApp) {
|
|||
"vwkxqq24oc49spbq",
|
||||
{
|
||||
airtable_id: moment.id,
|
||||
description: moment.description,
|
||||
description: moment.description || "No desc",
|
||||
video_url: moment.video,
|
||||
airtable_created_at: moment.created_at,
|
||||
kudos: moment.kudos,
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@ export function getShipmentDiff(
|
|||
|
||||
export function setupCronForShipments(app: ModifiedApp) {
|
||||
new Cron("*/10 * * * *", async () => {
|
||||
//@ts-ignore
|
||||
const allUsersWithAShipmentURL = Object.keys(app.db.JSON()).filter((e) =>
|
||||
e.startsWith(`shipment_url_`),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue