Kujtim Hoxha
12/07/2021, 10:58 AMThomas Ankcorn
12/07/2021, 11:05 AMKujtim Hoxha
12/07/2021, 11:09 AMmy_task = new Task(this, "MyTask", {
handler: "src/tasks/index.main",
});
And it does all the magic behind the scene.
Now we could either schedule it using
new Cron(this, "Cron", {
schedule: "rate(1 minute)",
job: my_task,
});
Or we could use an api call (maybe directly to ECS or create a small helper package) to run a task from our code (use case for this is for e.x I delete a record and it has thousands of children that you also need to delete ).Mischa Spiegelmock
12/07/2021, 1:16 PMKujtim Hoxha
12/07/2021, 1:17 PMMischa Spiegelmock
12/07/2021, 1:19 PMKujtim Hoxha
12/07/2021, 2:03 PMOmi Chowdhury
12/07/2021, 2:46 PMOmi Chowdhury
12/07/2021, 2:48 PMKujtim Hoxha
12/07/2021, 2:49 PMThomas Ankcorn
12/07/2021, 3:59 PMDerek Kershner
12/07/2021, 4:06 PMKujtim Hoxha
12/07/2021, 4:08 PMThomas Ankcorn
12/07/2021, 4:08 PMThomas Ankcorn
12/07/2021, 4:08 PMKujtim Hoxha
12/07/2021, 4:09 PMKujtim Hoxha
12/07/2021, 4:10 PMOmi Chowdhury
12/07/2021, 4:22 PMDerek Kershner
12/07/2021, 4:27 PMSo the best I can think of now is create ECS and task definitions using pure CDK and than just use the aws sdk to start tasks in my functionsFor me as well.
Thomas Ankcorn
12/07/2021, 4:28 PMcopilot task run --count 1 --memory 2048 --image=rds-migrate --task-role migrate-role --follow
Thomas Ankcorn
12/07/2021, 4:28 PMDerek Kershner
12/07/2021, 4:28 PMCurious about the long running task - is it something ML related? Or some existing code?I have used this for backup/DR related items and as a backup to reporting in the past (will try lambda first).
Derek Kershner
12/07/2021, 4:29 PMnot to shill for the copilot team too much but just sayingWell, realize you are in a place where Infrastructure as Code is...important, so you are unlikely to find folks using any of the CLIs as an end solution.
Derek Kershner
12/07/2021, 4:30 PMThomas Ankcorn
12/07/2021, 4:31 PMThomas Ankcorn
12/07/2021, 4:31 PMThomas Ankcorn
12/07/2021, 4:33 PMThomas Ankcorn
12/07/2021, 4:33 PM