Comments (6)
For those running into this issue, introduced in agenda v2 agenda/agenda@b9ecca9#diff-d24f116ac5cf860dd12424930aaffc40, work around is to stay in agenda v1.0.3
from agendash.
So I'm not that guy who just says "oh that's trivial" and walks away, I see two possibilities that could be straightforward for doing the version checking:
The first option that's not as easy would be to make a PR to agenda
itself to add a version number to the exported package, then get them to release that. (this might be better in the long run but it has other complications).
The other way that could be implemented wholly within agendash
is to make the dependency on agenda
a peer dependency. Then the app could detect the installed version by doing this:
const semver = require('semver');
const agendaVersion = require('agenda/package.json').version;
const useLegacyAPI = semver.lt(agendaVersion, '2.0.0');
...
If we add a parsed option to /app.js
where we pass the version to override the version we get from check agenda/package.json
, then we can split the tests into two versions as well (or at least two sections), and devDependencies
added in the package.json
like this:
"agenda-legacy": ">= 1.0.0 < 2.0.0",
"agenda": ">= 2.x.x",
That way both the legacy and newer versions of agenda
can be supported and have test coverage.
Oh, no, that won't work actually. But we could probably use npx to separate & test the legacy and non-legacy versions.
That was wrong too...
Boy do I feel dumb, this is what the build matrix is for 😂
from agendash.
Shouldn't this be a relatively easy fix? I'll be happy to submit a PR.
There's possibly a concern with backwards compatibility for projects sticking with agenda v1.0.3, but if that's an issue and the idea of doing that round a major version bump doesn't appeal to the maintainers, then checking the installed version of agenda and selecting which api to use shouldn't require too much coding.
from agendash.
Oh, now I see #72 ... so is the idea to move to consuming agenda-rest instead of the code in /lib/agendash.js
& /lib/middleware
?
from agendash.
Having the same issue. Unfortunately I don't have time right now to take a look at this 😢
from agendash.
This should be fixed in Agendash v2. Please try and report back if it's not working.
Closing this issue as stale.
from agendash.
Related Issues (20)
- Why are these jobs still marked as "running"? HOT 3
- Agendash not loading properly HOT 1
- [Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job HOT 11
- Cant delete schedule HOT 4
- Invalid date is showed on completed jobs HOT 1
- Suggestion: Support setting repeatTimezone when scheduling a job HOT 1
- Mongodb latest version problem HOT 1
- Does the "Refresh Interval" really work? HOT 4
- Can't connect to MongoDB Atlas anymore HOT 4
- Support for ARM64 docker images and v3 HOT 2
- Readonly mode HOT 1
- Is this repo maintained? HOT 2
- Error 404 for "api/jobs/requeue" and "api/jobs/delete" HOT 5
- not working with express HOT 3
- Typescript types
- How to support Typescript language?
- Multiple job deletion button is not working when have more jobs
- Not working with fastify + prefix HOT 2
- Error "QueryExceededMemoryLimitNoDiskUseAllowed" with V4.0 HOT 2
- Error: CDN files for popper and vue etc not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agendash.