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

A lot of job-related refactoring #148

Merged
merged 55 commits into from
Aug 5, 2023
Merged

A lot of job-related refactoring #148

merged 55 commits into from
Aug 5, 2023

Conversation

dabico
Copy link
Member

@dabico dabico commented Aug 4, 2023

A lot of changes, but most notably: reverting cleaner back to a Stream-centric implementation. Furthermore, the static code analysis component has been merged into the job itself.

Previously static-only methods have been migrated to dedicated utility
classes. The overall design is more intuitive now imo. Apart from that,
the dedicated classes make for much better autowiring candidates.
Yes I am aware I can make it fluent, but for some reason the editor
decides to spit out warnings if I don't put a class-level `@Getter`.
Since the rest of the members should not be accessible, I think that
this is acceptable.
Both convert Strings to either JsonArray or JsonPrimitive
Spring already has an autoconfiguration that adds it. This is wholly
unnecessary.
Web-related thigs will go there from now on
The stream now includes both the ID, along with the name. While not
wholly necessary, does improve debugging at no cost whatsoever.
The only difference now is that the process is more optimized. It will
be triggered every monday, streaming through all repositories that have
not been pinged for more than 5 weeks. At the same time, it performs
the old ls-remote check, with a cURL fallback. If the repository can
not be reached by either means, it is deleted. Otherwise, we update the
ping value.
Instead of using a single lock for creation, we now use a ReadWriteLock.
In essence, any number of threads can acquire read locks, but as soon as
a write lock is acquired all other threads will have to wait.
I think the listener is only useful in cases where the annotation is
used. When doing programmatic retries, we can just inject the logger
from the parent class, and have a more direct degree of control over
what we log.
@dabico dabico merged commit 1dd8321 into master Aug 5, 2023
5 checks passed
@dabico dabico deleted the refactoring/jobs branch August 5, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant