Page 1 of 1

Filter - sequence of tasks

Posted: Mon Sep 07, 2020 9:30 am
by RudiFueller
Hello,

this may be a newbie question, but please bear with me (I checked the docu + searched in the forum without success). I use the rpmfusion 1.34.20 under CentOS.

My idea is to sftp-upload the events to a remote server (this works) and set the archive flag for a successfully transferred event. Unfortunately it seems that in the filter the archive-flag is set first and _than_ the file transfer begins. If the remote server is not available (broken, whatever) the event still got the archive flag .

Is it possible to transfer first and only if the transfer was successful to set the archive flag. The advantage would be that the upload would be tried for all unarchived events and I can be sure that every archived event is being transferred.

Re: Filter - sequence of tasks

Posted: Mon Sep 07, 2020 1:51 pm
by iconnor
No there is no way to order the actions.

However, when an event is uploaded successfully, it sets an Uploaded flag on the event (so that it doesn't try again).

So you need to set the Archived flag.

Re: Filter - sequence of tasks

Posted: Mon Sep 07, 2020 3:06 pm
by RudiFueller
Currently I have a filter defined:

- All non-archived

should be

- archived +
- uploaded

Let's assume the upload of the event fails. Than the event is marked as archived and would never be uploaded again. Is there a way to filter query the "not yet uploaded" events? Or should I just take _every_ event for every filter run?

Re: Filter - sequence of tasks

Posted: Mon Sep 07, 2020 10:00 pm
by RudiFueller
Still not sure how to write the filter. I looked up the Events table in the DB and saw the "Uploaded" flag. So far so good. It would be easy if it would be possible to write a filter like:

for every event not uploaded -> upload

Is this possible? If not, I see only the possibility to define a filter condition, that is alway true (id > 0 or something) and un-limit the results to catch the potential event that is not yet uploaded due to an error before.