Commit Graph

27 Commits

Author SHA1 Message Date
Jordan Petridis
d9792e99c1
Revert 096197cf81
It breaks the testsuite 'sometime' which is fairly annoying.
The whole testuite setup is crap though and likely needs to be
fixed first.

Will re-revert the changes once a new stable release of the app
is done.
2020-06-21 17:03:36 +03:00
Julian Hofer
429356a217 Use tokio main-macro 2020-03-18 01:09:11 +00:00
Julian Hofer
636e2aefde Add tokio features and remove lazy keyword 2020-03-18 01:09:11 +00:00
Julian Hofer
e830589e38 Remove unused imports 2020-03-18 01:09:11 +00:00
Julian Hofer
933ba62f39 Upgrade to Futures 0.3 2020-03-18 01:09:11 +00:00
Jordan Petridis
19e0b7e565 Further preparations for Rusto 2018 edition 2018-11-18 12:59:01 +00:00
Jordan Petridis
fd4128c364 Prepare for Rust 2018 edition 2018-11-18 12:59:01 +00:00
Jordan Petridis
32b257ec30
cargo fmt 2018-11-13 15:29:20 +02:00
Jordan Petridis
8f6329d71d
podcasts-data: Add per file license annotations 2018-11-04 19:35:35 +02:00
Jordan Petridis
990d830f24
cargo fmt 2018-10-23 13:23:01 +03:00
Jordan Petridis
df302ad517
Pipeline: Do not terminate the stream upon errors
Stream::for_each terminated the stream upon the first error. This
was causing feeds to not update if any one returned a non-200ish
result. To work around this, we create a succesfull result for
every entry regardless at the end.

While we are at it, aslo switch from FuturesOrdered stream
to FuturesUnordered. There is no reason to use Ordered, this was
a typo initially.
2018-10-04 18:48:11 +03:00
Jordan Petridis
0887789f5e
Pipeline: Complete the move to Tokio Runtime 2018-09-29 13:35:45 +03:00
Jordan Petridis
62029f6164
Pipeline: Minor refactor
Use the proper Stream API to return a future to run on the
executor. Previously I was using a workaround to convert the
Stream into a future and run it to completion in the Executor,
since I was not aware of a better API.
2018-09-29 12:03:00 +03:00
Christopher Davis
7181c46ed5
podcasts-data: Upgrade hyper to 12.X
This also allows us to bump hyper_tls and native_tls, bringing
support for openssl 1.1.
2018-09-29 09:54:06 +03:00
Jordan Petridis
b40c12efbd
Pipeline: Avoid spamming stderr when not needed
This commit add a new DataError Variant for feeds that return 304.
Its expected behaviror and the current API of Source::into_feed
is kinda limiting the return type to make it easier to handle.

Up till now 304 was returning an Error to early return. Ideally
Source::into_feed will return a Multi variant Result Enum.

example:

enum FeedResult {
    Ok(Success(feed)),
    Ok(NotModified),
    Err(err),
}

Hopefully in a refactor in the near Future™

Till then we will just have to match and ignore
DataError::FeedNotModified.
2018-09-08 20:17:47 +03:00
Jordan Petridis
1ca4cb40dd
Pipeline: clear the imports of fututres 2018-09-08 20:17:47 +03:00
Jordan Petridis
e633fa41ac
Pipeline: Minor formatting improvment 2018-09-08 20:17:47 +03:00
Jordan Petridis
dac303e33b
Pipeline: Use a custom tokio threadpool
This reverts commit e64883eecb
and 40dd2d6923

Seems like core.run() returns once its done even if there
are still tasks in the Runtime underneath. A way to solve that
would be to call the shutdown_on_idle method.

We need ownership of the threadpool in order to invoke
`shutdown_on_idle` method but core.runtime only returns a
referrence so we need to create our own threadpool.
2018-09-08 20:17:46 +03:00
Jordan Petridis
674b3b54dc
Pipeline: reuse the prexisting runtime executor
Instead of creating our own threadpool, we should reuse the executor
of the tokio::runtime::Runtime that backs the tokio::reactor::Core.
2018-09-08 20:17:46 +03:00
Jordan Petridis
09948845ca
Pipeline: Remove use of clone! macro 2018-09-08 20:17:46 +03:00
Jordan Petridis
0b8a0695f7
Pipeline: Use tokio threadpool to index feeds 2018-09-08 20:17:46 +03:00
Jordan Petridis
a7c95d5718
Pipeline: Remove dependancy on rayon_futures
This requires a RUSTFLAG to be set before hand for rayon to build.
This brakes a lot of tools like rls and clippy by default and
require special configs for itnegration.

Additionally, rayon_futures is still 0.1 and not much work seem
to have gone into it. Ideally it should be replased with the tokio
runtime/threadpool.
2018-09-08 20:17:46 +03:00
Jordan Petridis
89b99614a0
Refactor the tests to use ? operator
As of ructc 1.27 #[test] can return errors. This improves a great
deal the ergonomics.
2018-08-18 17:02:31 +03:00
Jordan Petridis
471f6ff93b
Source: Remove ignore_etags option
This is never used anywhere else apart from the testsuite. Instead
of ignoring etags we should instead not save them if the feed does
not return 200 or 304. See #64.
2018-08-14 13:40:33 +03:00
Jordan Petridis
83c44aa12c
Replace links again 2018-07-26 07:41:43 +03:00
Jordan Petridis
53be091a31
Replace links 2018-07-25 03:26:41 +03:00
Jordan Petridis
04c68ba013
Initial massive renaming. 2018-07-25 03:26:35 +03:00