请在下面查看我的PowerShell代码的简化版本。
userRef=FirebaseDatabase.getInstance().getReference().child("Users");
RecieverId=getIntent().getExtras().get("brand_id").toString();
private void DisplayAllOffers() {
FirebaseRecyclerOptions<Posts> options = new FirebaseRecyclerOptions.Builder<Posts>()
.setQuery(PostRef.child(RecieverId),Posts.class).build();
FirebaseRecyclerAdapter<Posts,PostViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Posts, PostViewHolder>(options) {
@Override
protected void onBindViewHolder(@NonNull PostViewHolder holder, int position, @NonNull Posts model) {
// holder.Title.setText(model.getTitle());
final String postKey = getRef(position).getKey();
holder.Price.setText(model.getPrice());
holder.Duration.setText(model.getDuration());
holder.date.setText(model.getDate());
holder.description.setText(model.getDescription());
holder.time.setText(model.getTime());
holder.username.setText(model.getUsername());
holder.setLikeButtonStatus(postKey);
Picasso.get().load(model.getProfileImage()).into(holder.ProfileImage);
Picasso.get().load(model.getPostImage()).into(holder.postImage);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent postIntent = new Intent(BrandActivity.this,ClickPostActivity.class);
postIntent.putExtra("postKey",postKey);
startActivity(postIntent);
}
});
}
@NonNull
@Override
public PostViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
View view =LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.offer_layout,viewGroup,false);
PostViewHolder holder =new PostViewHolder(view);
return holder;
}
};
Profile_posts.setAdapter(firebaseRecyclerAdapter);
firebaseRecyclerAdapter.startListening();
}
我将发送大约30个名称的列表,但是经过几分钟的扫描,操作将停止并且没有报告任何错误,似乎$cred = Import-Clixml d:\cred.xml
Invoke-Command -ComputerName $computer -Authentication Credssp -Credential $cred -InDisconnectedSession -SessionOption @{OutputBufferingMode="Drop";IdleTimeout=2147483647} -Scriptblock {
$start_job = Start-Job -Scriptblock {
foreach ($user in $list) {
$a = Get-ChildItem -LiteralPath $user -Recurse -Force
Write-Output "$a.Count" | Out-File c:\test.log -Append
} -ArgumentList $list
}
被Start-Job
阻止或暂停了仍在运行。
关于如何检查或绕过此限制的任何想法?