Skip to content

Commit

Permalink
Merge 6978563 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Apr 20, 2021
2 parents 652526b + 6978563 commit 4a91936
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 57 deletions.
51 changes: 7 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- name: Run tests Web
run: dart test --platform chrome


analyze:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -82,65 +81,29 @@ jobs:
EOF
- name: Publish package
run: pub publish -f
#run: pub publish -dry-run

release:
needs: to-pubdev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
#- uses: actions/checkout@master

# UPDATING MASTER BRANCH

- name: Merge to master branch
uses: devmasx/[email protected]
with:
type: now
target_branch: master
github_token: ${{ github.token }}
#- uses: actions/checkout@v2

# ADD GITHUB RELEASE

- name: Get version from pubspec.yaml
run: echo "PKGVER=$(sed -n "s/version://p" pubspec.yaml | xargs)" >> $GITHUB_ENV
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.PKGVER }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



# gh-release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Get version from pubspec.yaml
# run: echo "PKGVER=$(sed -n "s/version://p" pubspec.yaml | xargs)" >> $GITHUB_ENV
# - name: Publish GitHub release
# uses: softprops/action-gh-release@v1
# with:
# tag_name: ${{ env.PKGVER }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
#
#
#
#
## pub:
## if: startsWith(github.event.ref, 'refs/tags/rc')
## runs-on: ubuntu-latest
## steps:
## - name: echo
## run: echo "Yes"
##
## merge-to-master:
## needs: [test, analyze]
## if: startsWith(github.event.ref, 'refs/tags/rc')
## runs-on: ubuntu-latest
## steps:
## - uses: actions/checkout@v2
## - name: Merge current -> master
## uses: devmasx/[email protected]
## with:
## type: now
## target_branch: master
## github_token: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.2.0+3-alpha
# 0.2.1-alpha

- Added TimeScheduler

Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ load balancing, rate limiting, lazy execution.
after object creation. But it fact all the schedulers are ready to handle
`run` calls at random moments.*

# TimeScheduler

Runs tasks asynchronously at the specified time.

``` dart
final scheduler = TimeScheduler();
scheduler.run(() { ... callback ... }, DateTime(2020, 02, 20, 20, 02, 20));
```

# IntervalScheduler

Runs tasks asynchronously, maintaining a fixed time interval between starts.
Expand Down Expand Up @@ -50,6 +40,17 @@ scheduler.run(()=>downloadPage('pageH'));
scheduler.run(()=>downloadPage('pageI'));
```

# TimeScheduler

Runs tasks asynchronously at the specified time.

``` dart
final scheduler = TimeScheduler();
// run the function on January 1st at 17:75
scheduler.run(() { ... }, DateTime(2020, 1, 1, 17, 45));
```

# LazyScheduler

Runs only the last added task and only if no new tasks have been added during
Expand All @@ -61,7 +62,7 @@ final scheduler = LazyScheduler(latency: Duration(seconds: 1));
scheduler.run(()=>pushUpdate('1')); // maybe we will push 1
scheduler.run(()=>pushUpdate('1+1')); // no we will push 1+1
scheduler.run(()=>pushUpdate('1+1-1')); // no we will push 1+1-1
scheduler.run(()=>pushUpdate('1')); // it's good we so lazy
scheduler.run(()=>pushUpdate('1')); // it's good we're so lazy
scheduler.run(()=>pushUpdate('777')); // maybe we will push this
```

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: schedulers
description: Dart library for running asynchronous functions on time. Useful for load balancing, rate limiting, lazy execution.
repository: https://github.com/rtmigo/schedulers

version: 0.2.0+3-alpha
version: 0.2.1-alpha

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 4a91936

Please sign in to comment.