🏓 Library table styling WIP
This commit is contained in:
@@ -13,35 +13,10 @@ interface SearchData {
|
||||
priority: PriorityEnum;
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
function sleep(ms: number): Promise<NodeJS.Timeout> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
// foo.then(async (data) => {
|
||||
// const instance: SearchInstance = await SocketService.post("search");
|
||||
// await sleep(10000);
|
||||
|
||||
// const searchInfo = await SocketService.post(
|
||||
// `search/${instance.id}/hub_search`,
|
||||
// {
|
||||
// query: {
|
||||
// pattern: "H.P. Lovecraft",
|
||||
// file_type: "compressed",
|
||||
// extensions: ["cbz", "cbr"],
|
||||
// },
|
||||
// hub_urls: [
|
||||
// "nmdcs://piter.feardc.net:411",
|
||||
// "dchub://dc.rutrack.net",
|
||||
// "dchub://dc.elitedc.ru",
|
||||
// ],
|
||||
// priority: 1,
|
||||
// },
|
||||
// );
|
||||
// await sleep(10000);
|
||||
// const results = await SocketService.get(`search/${instance.id}/results/0/5`);
|
||||
// console.log(results);
|
||||
// });
|
||||
|
||||
export const search = async (data: SearchData) => {
|
||||
await SocketService.connect("admin", "password");
|
||||
await sleep(10000);
|
||||
@@ -52,7 +27,7 @@ export const search = async (data: SearchData) => {
|
||||
);
|
||||
await sleep(10000);
|
||||
const results = await SocketService.get(`search/${instance.id}/results/0/5`);
|
||||
console.log("ASDASDASDASDASDASDA", results);
|
||||
console.log("results", results);
|
||||
SocketService.disconnect();
|
||||
return results;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user