Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1880 small import changes #1889

Closed

Conversation

r-peschke
Copy link
Member

Uses the Lookup class from import_mixins.py to check for duplicate sin account_json_upload

@r-peschke r-peschke added bug enhancement General enhancement which is neither bug nor feature labels Aug 29, 2023
@r-peschke r-peschke added this to the 4.1 milestone Aug 29, 2023
@r-peschke r-peschke self-assigned this Aug 29, 2023
@r-peschke r-peschke linked an issue Aug 29, 2023 that may be closed by this pull request
Comment on lines +3828 to +3830
- warning
- error
- done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to add these to the general action worker? What's e.g. the difference between end and done? warning and error are really import-specific and do not convey meaning about the status of the action worker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree and we knew, that this is a misuse of the action_worker. We did it with the idea that this is the faster way to develop the imports. It should be a separate collection, but also to be written in a separate transaction in parallel to the data. We will separate action_worker and its functionality from preview_import-worker on moving to relational db-design.
The meaning of the action_worker states is not compatible with that of the preview_import.
end in action_worker means, that the action_worker ended and can be deleted from database. The last point is, why we didn't wanted to use this state for the preview_import. abort may be similar.
We could use always running, maybe with some statistical problems or deleting long running action workers.

done in preview_import means, that everything is okay without warnings (could be imported) or error (whole import may not be imported). A program, cleaning or statistic job can easily decide by the state if it is an action worker or a preview_import.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I don't think we should mix the stati of action workers and imports. I would suggest to leave the state of an import inside the data saved in the action worker and leave the state at running until the import is either sucessful or aborted. If we implement some cleanup tool for action workers, it can, as you said, easily decide for every action worker still running whether it is an actual action worker or an import and then decide to keep or delete it. To summarize: We already have a spearate import state inside the data, I would prefer not to mix it with the action worker's state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no separate state inside the data, there is only a row state. Lets talk about this, I'm not willing to change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New collection import_preview introduced and not using the action_worker for this anymore.
I'll close this in favor of #1912

openslides_backend/action/mixins/import_mixins.py Outdated Show resolved Hide resolved
openslides_backend/action/mixins/import_mixins.py Outdated Show resolved Hide resolved
openslides_backend/action/mixins/import_mixins.py Outdated Show resolved Hide resolved
@r-peschke
Copy link
Member Author

Closing this one in favor of #1912.
The last 2 items, reusing HeaderEntry and separating the import_preview data from action_worker-collection to new collection.

@r-peschke r-peschke closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement General enhancement which is neither bug nor feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements for topic and account import
2 participants