Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "34 22 * * 4"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ javascript ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
31 changes: 31 additions & 0 deletions .github/workflows/comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Add immediate comment on new issues

on:
issues:
types: [opened]

jobs:
createComment:
runs-on: ubuntu-latest
steps:
- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.2
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know
30 changes: 30 additions & 0 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test suite

on: [push, pull_request]

jobs:
tests:
name: tests
runs-on: ubuntu-latest
# needs: [lintcode,lintstyle,lintdocs] # we could add prior jobs for linting, if desired
steps:
- name: checkout
uses: actions/checkout@v3

- name: Setup meteor
uses: meteorengineer/setup-meteor@v1
with:
meteor-release: '2.13.3'

- name: cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: cd tests && meteor npm install && meteor npm run test

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.build*
node_modules
.idea
10 changes: 5 additions & 5 deletions .npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 51 additions & 47 deletions .versions
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
allow-deny@1.1.0
babel-compiler@7.1.1
babel-runtime@1.2.6
base64@1.0.11
binary-heap@1.0.10
boilerplate-generator@1.5.0
callback-hook@1.1.0
check@1.3.1
ddp@1.4.0
ddp-client@2.3.3
ddp-common@1.4.0
ddp-server@2.2.0
diff-sequence@1.1.0
dynamic-import@0.4.2
ecmascript@0.11.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.7.2
ecmascript-runtime-server@0.7.1
ejson@1.1.0
geojson-utils@1.0.10
http@1.4.1
id-map@1.1.0
littledata:synced-cron@1.5.0
local-test:littledata:synced-cron@1.5.0
logging@1.1.20
meteor@1.9.0
minimongo@1.4.4
modern-browsers@0.1.2
modules@0.12.2
modules-runtime@0.10.0
mongo@1.5.0
mongo-dev-server@1.1.0
mongo-id@1.0.7
npm-mongo@3.0.11
ordered-dict@1.1.0
promise@0.11.1
random@1.1.0
reload@1.2.0
retry@1.1.0
routepolicy@1.0.13
socket-stream-client@0.2.2
tinytest@1.1.0
tracker@1.2.0
underscore@1.0.10
url@1.2.0
webapp@1.6.0
webapp-hashing@1.0.9
allow-deny@2.0.0-alpha300.17
babel-compiler@7.11.0-alpha300.17
babel-runtime@1.5.2-alpha300.17
base64@1.0.13-alpha300.17
binary-heap@1.0.12-alpha300.17
boilerplate-generator@2.0.0-alpha300.17
callback-hook@1.6.0-alpha300.17
check@1.3.3-alpha300.17
core-runtime@1.0.0-alpha300.17
ddp@1.4.2-alpha300.17
ddp-client@3.0.0-alpha300.17
ddp-common@1.4.1-alpha300.17
ddp-server@3.0.0-alpha300.17
diff-sequence@1.1.3-alpha300.17
dynamic-import@0.7.4-alpha300.17
ecmascript@0.16.8-alpha300.17
ecmascript-runtime@0.8.2-alpha300.17
ecmascript-runtime-client@0.12.2-alpha300.17
ecmascript-runtime-server@0.11.1-alpha300.17
ejson@1.1.4-alpha300.17
facts-base@1.0.2-alpha300.17
fetch@0.1.4-alpha300.17
geojson-utils@1.0.12-alpha300.17
id-map@1.2.0-alpha300.17
inter-process-messaging@0.1.2-alpha300.17
local-test:quave:synced-cron@2.0.2
logging@1.3.3-alpha300.17
meteor@2.0.0-alpha300.17
minimongo@2.0.0-alpha300.17
modern-browsers@0.1.10-alpha300.17
modules@0.19.1-alpha300.17
modules-runtime@0.13.2-alpha300.17
mongo@2.0.0-alpha300.17
mongo-decimal@0.1.4-alpha300.17
mongo-dev-server@1.1.1-alpha300.17
mongo-id@1.0.9-alpha300.17
npm-mongo@4.16.1-alpha300.17
ordered-dict@1.2.0-alpha300.17
promise@1.0.0-alpha300.17
quave:synced-cron@2.0.2
random@1.2.2-alpha300.17
react-fast-refresh@0.2.8-alpha300.17
reload@1.3.2-alpha300.17
retry@1.1.1-alpha300.17
routepolicy@1.1.2-alpha300.17
socket-stream-client@0.5.2-alpha300.17
tinytest@2.0.0-alpha300.17
tracker@1.3.3-alpha300.17
underscore@1.0.14-alpha300.17
webapp@2.0.0-alpha300.17
webapp-hashing@1.1.2-alpha300.17
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

## 2.0.2 (2023-11-8)

- Meteor 3 release issues, I had to run `chmod +rw .npm/package` for it to work.

## 2.0.1 (2023-11-8)

This release failed but the content is present in the next.

## 2.0.0 (2023-11-8)

This release failed but the content is present in the next.

- Migrates `later` to `@breejs/later@4.1.0`
- Moves away from `underscore`
- Moves away from `var` usage
- Upgrades code to Meteor 3
- Upgrades tests to Meteor 3 (async tests)

## 1.5.1 - littledata:synced-cron

- Initial [version](https://github.com/percolatestudio/meteor-synced-cron).
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

A simple cron system for [Meteor](http://meteor.com). It supports syncronizing jobs between multiple processes. In other words, if you add a job that runs every hour and your deployment consists of multiple app servers, only one of the app servers will execute the job each time (whichever tries first).

## Migrated from percolate:synced-cron littledata:synced-cron
## Migrated from littledata:synced-cron

Since the original creator of the project could no longer maintain it, we had to migrate the package to another organisation to allow further maintenance and updates.
Quave version is compatible with Meteor 3.0 and forward.

To migrate you can simply run

``` sh
$ meteor remove percolate:synced-cron && meteor add littledata:synced-cron
$ meteor remove littledata:synced-cron && meteor add quave:synced-cron
```

## Installation

``` sh
$ meteor add littledata:synced-cron
$ meteor add quave:synced-cron
```

## API
Expand All @@ -24,16 +24,15 @@ $ meteor add littledata:synced-cron

To write a cron job, give it a unique name, a schedule and a function to run like below. SyncedCron uses the fantastic [later.js](http://bunkat.github.io/later/) library behind the scenes. A Later.js `parse` object is passed into the schedule call that gives you a huge amount of flexibility for scheduling your jobs, see the [documentation](http://bunkat.github.io/later/parsers.html#overview).

``` js
```js
SyncedCron.add({
name: 'Crunch some important numbers for the marketing department',
schedule: function(parser) {
// parser is a later.parse object
return parser.text('every 2 hours');
},
job: function() {
var numbersCrunched = CrushSomeNumbers();
return numbersCrunched;
crushSomeNumbers();
}
});
```
Expand Down Expand Up @@ -109,7 +108,7 @@ SyncedCron uses Meteor's `logging` package by default. If you want to use your o
SyncedCron expects a function as `logger`, and will pass arguments to it for you to take action on.

```js
var MyLogger = function(opts) {
const MyLogger = function(opts) {
console.log('Level', opts.level);
console.log('Message', opts.message);
console.log('Tag', opts.tag);
Expand Down Expand Up @@ -141,9 +140,3 @@ Write some code. Write some tests. To run the tests, do:
``` sh
$ meteor test-packages ./
```

## License

MIT. (c) Percolate Studio, originally designed and built by Zoltan Olah (@zol), now community maintained.

Synced Cron was developed as part of the [Verso](http://versoapp.com) project.
8 changes: 0 additions & 8 deletions example/.meteor/.finished-upgraders

This file was deleted.

9 changes: 0 additions & 9 deletions example/.meteor/packages

This file was deleted.

1 change: 0 additions & 1 deletion example/.meteor/release

This file was deleted.

Loading